{{--<div class="bjui-pageHeader" style="background-color:#fefefe; border-bottom:none;">--}}
{{--<form data-toggle="ajaxsearch"--}}
{{--data-options="{url:'urcbwyjr/personnel/company-address-list',searchDatagrid:$.CurrentNavtab.find('#company-address-list')}">--}}
{{--<fieldset>--}}
{{--<legend style="font-weight:normal;">企业搜索：</legend>--}}
{{--<div style="margin:0; padding:1px 5px 5px;">--}}
{{--<span>承租人：</span>--}}
{{--<input type="text" name="name" class="form-control" size="20">--}}
{{--<button type="submit" class="btn-green" data-icon="search">开始搜索！</button>--}}
{{--<button type="reset" class="btn-orange" data-icon="times">重置</button>--}}
{{--</div>--}}
{{--</fieldset>--}}
{{--</form>--}}
{{--</div>--}}
<div class="bjui-pageContent">
    <table id="company-address-list" class="table table-bordered" data-toggle="datagrid" data-options="{
        height: '100%',
        dataUrl: '/admin/personnel/company-address-list',
        {{--delUrl: '/admin/personnel/address-list-member-del',--}}
    {{--delPK: 'employee_id',--}}
    {{--paging: {showPagenum:10, selectPageSize:'20,50,100', pageCurrent:1, pageSize:20},--}}
            paging: false,
            fullGrid: true,
            linenumberAll: true,
            filterThead:false,
            fieldSortable:false,
            columnMenu:false,
            showToolbar: true,
            toolbarCustom: toolbar,
            isTree:'name',
            treeOptions:{
                keys: {
                    {{--key: 'id',        // id--}}
            parentKey: 'oa_department_id',       // 父id
            childKey: 'contacts_list',  // 子列表数据key值
            {{--childLen  : 'childlen',  // 子列表数据条数--}}
    {{--isParent  : 'isparent',  // 是否父数据--}}
    {{--level     : 'level',     // 层级--}}
    {{--order     : 'order',     // 顺序--}}
            isExpand: 'isExpand'   // 子列表是否展开
        },
        expandAll: false,
        {{--simpleData: true,          // 是否简单数据(array格式)--}}
            add: false           // 显示添加按钮
        }
    }">
        <thead>
        <tr>
            <th data-options="{name:'name',align:'center',width:100}">名称</th>
            <th data-options="{name:'position',align:'center',width:100}">职位</th>
            <th data-options="{name:'mobile',align:'center',width:100}">手机号码</th>
            <th data-options="{name:'email',align:'center',width:100}">email</th>
            <th data-options="{align:'center',width:100,render:operationColumn}">操作</th>
        </tr>
        </thead>
    </table>
</div>

<script type="text/javascript">
    function operationColumn(value, data) {
        if (data.id) {
            var html = '<button type="button" class="btn btn-blue" data-toggle="navtab" data-options="{id:\'personnel-file\', url:\'/admin/personnel/personnel-file-info\', title:\'查看员工人事档案\', fresh:true, data:{employee_id:' + data.id + '}}"><i class="fa fa-eye"></i> 查看人事档案</button>';
            html += '<button type="button" class="btn btn-green" data-toggle="navtab" data-options="{id:\'address-list-member-edit\', url:\'/admin/personnel/address-list-member-edit\', title:\'编辑员工信息\', fresh:true, data:{employee_id:' + data.id + '}}"><i class="fa fa-edit"></i> 编辑</button>';
            html += '<button type="button" class="btn btn-red"  data-toggle="dialog" data-options="{id:\'employee-resign\', url:\'/admin/personnel/address-list-member-del\', mask:true, width:445, height:270, title:\'员工离职\',data:{id:' + data.id + '}}" ><i class="fa fa-remove"></i> 离职</button>';
        }
        return html;
    }
    function toolbar() {
        var html = '<button type="button" class="btn btn-blue"  data-toggle="navtab" data-options="{id:\'address-list-member-add\', url:\'/admin/personnel/address-list-member-add\', title:\'添加员工信息\', fresh:true}"><i class="fa fa-plus"></i> 添加</button>';
        html += '<button type="button" class="btn btn-blue"  data-toggle="dialog" data-options="{id:\'address-list-member-import\', url:\'/admin/personnel/address-list-member-import\', title:\'导入员工信息\',width:500,height:400, mask:true}"><i class="fa fa-plus"></i> 批量导入</button>';
        return html;
    }
</script>